﻿<controls:ChildWindow
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="LantinxLBS.Views.FrmTask"
           Width="400" Height="300" 
           Title="任务管理">

    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.Resources>
            <DataTemplate x:Key="styleListMarks">
                <StackPanel Orientation="Horizontal">

                    <TextBlock Text="{Binding MarkName}" ToolTipService.ToolTip="{Binding MarkName}"></TextBlock>
                </StackPanel>
            </DataTemplate>
            <DataTemplate x:Key="styleUser">
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="用户名:"/>
                    <TextBlock Text="{Binding UserName}"/>
                    <TextBlock Text="电话号码:"/>
                    <TextBlock Text="{Binding Phone}"/>
                </StackPanel>
            </DataTemplate>
            <DataTemplate x:Key="styleWorkItem">
                <ComboBoxItem  Background="AliceBlue">
                    <CheckBox Content="{Binding WorkItemName}" Tag="{Binding}"  Click="CheckBox_Click"   ></CheckBox>
                </ComboBoxItem>
            </DataTemplate>
        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="75"/>
            <ColumnDefinition Width="0.733*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="26" />
            <RowDefinition Height="26"/>
            <RowDefinition Height="26"/>
            <RowDefinition Height="26"/>
            <RowDefinition Height="26"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto" MinHeight="35" />
        </Grid.RowDefinitions>

        <Button x:Name="CancelButton" Content="退出" Click="CancelButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="6" Grid.Column="1" />
        <Button x:Name="OKButton" Content="添加用户" Click="OKButton_Click" Height="23" Margin="137,12,79,0" Grid.Row="6" Grid.Column="1" />
        <TextBlock Margin="0,0,25,8" TextWrapping="Wrap" Text="选择用户:"/>
        <TextBlock Margin="0,0,25,8" Grid.Row="1" TextWrapping="NoWrap" Text="选择标注:"/>
        <TextBlock Margin="0,4,25,4" Grid.Row="2" TextWrapping="NoWrap" Text="开始时间:"/>
        <TextBlock Margin="0,4,16,0" Grid.Row="3" TextWrapping="NoWrap" Text="结束时间:"/>
        <TextBlock Margin="0,4,25,4" Grid.Row="4" TextWrapping="NoWrap" Text="选择类型:"/>
        <ComboBox x:Name="cmbUser" Grid.Column="1" ItemTemplate="{StaticResource styleUser}"/>
        <ComboBox x:Name="cmbMark" Grid.Column="1" Margin="0,0,1,0" Grid.Row="1" ItemTemplate="{StaticResource styleListMarks}" />
        <StackPanel Grid.Column="1" Margin="0,0,46,0" Grid.Row="2">
            <controls:DatePicker x:Name="dateStart" Height="25" Margin="0,0,79,0"/>
        </StackPanel>
        <controls:DatePicker x:Name="dateEnd" Grid.Column="1" Margin="0,0,125,0" Grid.Row="3"/>
        <ListBox x:Name="lstWorkItemType" Grid.Column="1" Margin="0,0,1,0" Grid.Row="5" ItemTemplate="{StaticResource styleWorkItem}"/>
    </Grid>
</controls:ChildWindow>